package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhAgentPartsattributeMapper;
import com.ruoyi.zsyh.domain.ZsyhAgentPartsattribute;
import com.ruoyi.zsyh.service.IZsyhAgentPartsattributeService;
import com.ruoyi.common.core.text.Convert;

/**
 * 会长商城产品规格Service业务层处理
 * 
 * @author yuexl
 * @date 2021-12-16
 */
@Service
public class ZsyhAgentPartsattributeServiceImpl implements IZsyhAgentPartsattributeService 
{
    @Autowired
    private ZsyhAgentPartsattributeMapper zsyhAgentPartsattributeMapper;

    /**
     * 查询会长商城产品规格
     * 
     * @param id 会长商城产品规格ID
     * @return 会长商城产品规格
     */
    @Override
    public ZsyhAgentPartsattribute selectZsyhAgentPartsattributeById(String id)
    {
        return zsyhAgentPartsattributeMapper.selectZsyhAgentPartsattributeById(id);
    }

    /**
     * 查询会长商城产品规格列表
     * 
     * @param zsyhAgentPartsattribute 会长商城产品规格
     * @return 会长商城产品规格
     */
    @Override
    public List<ZsyhAgentPartsattribute> selectZsyhAgentPartsattributeList(ZsyhAgentPartsattribute zsyhAgentPartsattribute)
    {
        return zsyhAgentPartsattributeMapper.selectZsyhAgentPartsattributeList(zsyhAgentPartsattribute);
    }

    /**
     * 新增会长商城产品规格
     * 
     * @param zsyhAgentPartsattribute 会长商城产品规格
     * @return 结果
     */
    @Override
    public int insertZsyhAgentPartsattribute(ZsyhAgentPartsattribute zsyhAgentPartsattribute)
    {
        zsyhAgentPartsattribute.setCreateTime(DateUtils.getNowDate());
        return zsyhAgentPartsattributeMapper.insertZsyhAgentPartsattribute(zsyhAgentPartsattribute);
    }

    /**
     * 修改会长商城产品规格
     * 
     * @param zsyhAgentPartsattribute 会长商城产品规格
     * @return 结果
     */
    @Override
    public int updateZsyhAgentPartsattribute(ZsyhAgentPartsattribute zsyhAgentPartsattribute)
    {
        zsyhAgentPartsattribute.setUpdateTime(DateUtils.getNowDate());
        return zsyhAgentPartsattributeMapper.updateZsyhAgentPartsattribute(zsyhAgentPartsattribute);
    }

    /**
     * 删除会长商城产品规格对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhAgentPartsattributeByIds(String ids)
    {
        return zsyhAgentPartsattributeMapper.deleteZsyhAgentPartsattributeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除会长商城产品规格信息
     * 
     * @param id 会长商城产品规格ID
     * @return 结果
     */
    @Override
    public int deleteZsyhAgentPartsattributeById(String id)
    {
        return zsyhAgentPartsattributeMapper.deleteZsyhAgentPartsattributeById(id);
    }
}
